/**
 * 一些校验规则
 */
// 校验手机号
export const checkPhone = (phone: string) => {
    return /^1[3456789]\d{9}$/.test(phone);
};
// 校验身份证号
export const checkIdCard = (idCard: string) => {
    return /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(idCard);
};
// 校验中文姓名
export const checkChineseName = (name: string) => {
    return /^[\u4e00-\u9fa5]{2,4}$/.test(name);
};
// 校验银行卡号
export const checkBankCard = (bankCard: string) => {
    return /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{15}$|^[1-9]\d{17}([0-9]|[xX])$/.test(bankCard);
};